import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";

export default {
  //新增字典
  dictionaryCreate: data => {
    return http.request<any>("post", baseUrlApi("/dictionary"), { data });
  },
  //查询字典列表
  dictionaryPage: params => {
    return http.request<any>("get", baseUrlApi("/dictionary"), { params });
  },
  //字典更新
  dictionaryUpdate: data => {
    return http.request<any>("put", baseUrlApi("/dictionary"), { data });
  },
  //删除字典
  dictionaryDelete: data => {
    return http.request<any>("delete", baseUrlApi("/dictionary"), { data });
  },

  dictionaryDataCreate: data => {
    return http.request<any>("post", baseUrlApi("/dictionaryData"), { data });
  },

  dictionaryDataAll: params => {
    return http.request<any>("get", baseUrlApi("/dictionaryData"), { params });
  },
  dictionaryDataDelete: data => {
    return http.request<any>("delete", baseUrlApi("/dictionaryData"), { data });
  },
  dictionaryDataUpdate: data => {
    return http.request<any>("put", baseUrlApi("/dictionaryData"), { data });
  }
};
